﻿public class UIFollowTargetOnce : UIFollowTarget
{
	public float time;

	protected override void OnUpdate(bool isVisible)
	{
		base.OnUpdate(isVisible);

		enabled = false;

		Invoke("DestroySelf", time);
	}

	private void DestroySelf()
	{
		if (gameObject != null)
			Destroy(gameObject);
	}
}
